/*
 * GPS_PRE_NXT_ST.c
 *
 *  Created on: 2015-10-19
 *      Author: Administrator
 */

#include <std.h>
#include "GPS_PRE_NXT_ST.h"
#include "GPS_Location_Handle.h"


#ifdef __cplusplus
#pragma DATA_SECTION("UserDataFile")
#else
#pragma DATA_SECTION(PRE_NXT_ST_Info,"UserDataFile");
#endif
/*
 * PRE_NXT_ST_Info[0=NXT_ST_1]	:next station 1
 * PRE_NXT_ST_Info[1=NXT_ST_2]	:next station 2
 * PRE_NXT_ST_Info[2=NXT_ST_3]	:next station 3
 * PRE_NXT_ST_Info[3=NXT_ST_4]	:next station 4
 * PRE_NXT_ST_Info[4=CURRENT_ST]:current station
 * PRE_NXT_ST_Info[5=PREV_ST_1]	:previous 1
 * PRE_NXT_ST_Info[6=PREV_ST_2]	:previous 2
 * PRE_NXT_ST_Info[7=FOUND_ST]	:station found after SearchStationDatabase();
 * PRE_NXT_ST_Info[8=PREV_P]	:last station or information point;
 */
ST_INFO PRE_NXT_ST_Info[9];




#pragma CODE_SECTION(Dis_PRE_NXT_ST_ExceptPRE,"FuncsMap2H0SARam")
//disable PRE_NXT_ST_Info[] except PREV_ST_1 and PREV_ST_2
void Dis_PRE_NXT_ST_ExceptPRE(void)
{
	PRE_NXT_ST_Info[NXT_ST_1].ST_Index=0;
	PRE_NXT_ST_Info[NXT_ST_2].ST_Index=0;
	PRE_NXT_ST_Info[NXT_ST_3].ST_Index=0;
	PRE_NXT_ST_Info[NXT_ST_4].ST_Index=0;
	PRE_NXT_ST_Info[CURRENT_ST].ST_Index=0;
	PRE_NXT_ST_Info[FOUND_ST].ST_Index=0;
	PRE_NXT_ST_Info[PREV_P].ST_Index=0;
	return;
}


#pragma CODE_SECTION(Dis_PRE_NXT_ST,"FuncsMap2H0SARam")
//disable all PRE_NXT_ST_Info[].
void Dis_PRE_NXT_ST(void)
{
	Uns i;
	for(i=0;i<9;i++)
	{
		PRE_NXT_ST_Info[i].ST_Index=0;
	}
	return;
}

